﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CommonTagTime;
using CommonTagTime.ModelObject;
using System.IO;
public partial class UserControl_NewsItem : System.Web.UI.UserControl
{
    public TipNews objNews = new TipNews();
    public bool isNoImage = false;
    public string img = string.Empty;
    public SitePage sp = new SitePage();
    protected void Page_Load(object sender, EventArgs e)
    {
        img=GetImageUrl();
    }
    private string GetImageUrl()
    {
        string imagePage = clsConfigData.DEFAULT_UPLOAD_NEWEVENTS_NOIMAGE;
        if (File.Exists(this.Page.Server.MapPath(clsConfigData.DEFAULT_UPLOAD_TIPNEW_THUMBIMAGE_FOLDER + objNews.ThumbImage)))
        {
            return clsConfigData.DEFAULT_UPLOAD_TIPNEW_THUMBIMAGE_FOLDER + objNews.ThumbImage;
        }
        isNoImage = true;
        return imagePage;
    }
}